// import app from '@/App'
// import login from '@/components/login'
// import home from '@/components/home'
// import Apple from '@/components/home/fruit/apple'
// import Banana from '@/components/home/fruit/banana'
// import Origin from '@/components/home/fruit/origin'
// import Pear from '@/components/home/fruit/pear/index'
// import Pineapple from '@/components/home/fruit/pineapple/index'
// import Litchi from '@/components/home/fruit/litchi'
// import Customize from '@/components/home/fruit/customize'

const channelRoter = {
  path: '/home',
  name: 'home',
  // component: home,
  component: () => import('@/components/home'),
  meta: {
    title: 'home',
    keepAlive: true,
    index: '1'
  },
  // component: () => import('@/components/home') 异步组件加在更快（需要安装npm i babel-plugin-syntax-dynamic-import -D）
  children: [
    {
      path: '/fruit/Apple',
      name: 'fruit/apple',
      // component: Apple,
      component: () => import('@/components/home/fruit/apple'),
      meta: {
        title: 'apple',
        keepAlive: true
      }
    },
    {
      path: '/fruit/Banana',
      name: 'fruit/banana',
      // component: Banana,
      component: () => import('@/components/home/fruit/banana'),
      meta: {
        title: 'banana',
        keepAlive: true
      }
    },
    {
      path: '/fruit/Origin',
      name: 'fruit/origin',
      // component: Origin,
      component: () => import('@/components/home/fruit/origin'),
      meta: {
        title: 'origin',
        keepAlive: true
      }
    },
    {
      path: '/fruit/Pear',
      name: 'fruit/pear',
      // component: Pear,
      component: () => import('@/components/home/fruit/pear/index'),
      meta: {
        title: 'pear',
        keepAlive: true
      }
    },
    {
      path: '/fruit/Pineapple',
      name: 'fruit/pineapple',
      // component: Pineapple,
      component: () => import('@/components/home/fruit/pineapple/index'),
      meta: {
        title: 'pineapple',
        keepAlive: true
      }
    },
    {
      path: '/fruit/Litchi',
      name: 'fruit/litchi',
      // component: Litchi,
      component: () => import('@/components/home/fruit/litchi'),
      meta: {
        title: 'litchi',
        keepAlive: true
      }
    },
    {
      path: '/fruit/Customize',
      name: 'fruit/customize',
      // component: Customize,
      component: () => import('@/components/home/fruit/customize'),
      meta: {
        title: 'customize',
        keepAlive: true
      }
    }
  ]
  // redirect: '/fruit/banana' // 在children的后面加一个redirect：'/想要默认展示的子路由名字'0
}
export default channelRoter
// export default [
//   {
//     path: '/', // 默认路由
//     // name: '/login',
//     redirect: '/login' // 进入页面是默认路由，自动redirect到主页
//   },
//   {
//     path: '/login',
//     name: 'login',
//     // component: login,
//     component: () => import('@/components/login'),
//     meta: {
//       title: 'login',
//       keepAlive: true
//     },
//     // 理由配置的时候增加的钩子
//     beforeEnter: (to, from, next) => { // 进入路由之前
//       // console.log('login route before enter')
//       next()
//     }
//   },
//   {
//     path: '/home',
//     name: 'home',
//     // component: home,
//     component: () => import('@/components/home'),
//     // component: () => import('@/components/home') 异步组件加在更快（需要安装npm i babel-plugin-syntax-dynamic-import -D）
//     children: [
//       // {
//       //   path: '*',
//       //   redirect: '/fruit/Apple'
//       // },
//       {
//         path: '/fruit/Apple',
//         name: 'fruit/apple',
//         // component: Apple,
//         component: () => import('@/components/home/fruit/apple'),
//         meta: {
//           title: 'apple',
//           keepAlive: true
//         }
//       },
//       {
//         path: '/fruit/Banana',
//         name: 'fruit/banana',
//         // component: Banana,
//         component: () => import('@/components/home/fruit/banana'),
//         meta: {
//           title: 'banana',
//           keepAlive: true
//         }
//       },
//       {
//         path: '/fruit/Origin',
//         name: 'fruit/origin',
//         // component: Origin,
//         component: () => import('@/components/home/fruit/origin'),
//         meta: {
//           title: 'origin',
//           keepAlive: true
//         }
//       },
//       {
//         path: '/fruit/Pear',
//         name: 'fruit/pear',
//         // component: Pear,
//         component: () => import('@/components/home/fruit/pear/index'),
//         meta: {
//           title: 'pear',
//           keepAlive: true
//         }
//       },
//       {
//         path: '/fruit/Pineapple',
//         name: 'fruit/pineapple',
//         // component: Pineapple,
//         component: () => import('@/components/home/fruit/pineapple/index'),
//         meta: {
//           title: 'pineapple',
//           keepAlive: true
//         }
//       },
//       {
//         path: '/fruit/Litchi',
//         name: 'fruit/litchi',
//         // component: Litchi,
//         component: () => import('@/components/home/fruit/litchi'),
//         meta: {
//           title: 'litchi',
//           keepAlive: true
//         }
//       },
//       {
//         path: '/fruit/customize',
//         name: 'fruit/customize',
//         // component: Customize,
//         component: () => import('@/components/home/fruit/customize'),
//         meta: {
//           title: 'customize',
//           keepAlive: true
//         }
//       }
//     ],
//     redirect: '/fruit/banana' // 在children的后面加一个redirect：'/想要默认展示的子路由名字'0
//   }
// ]
